#ifndef _STRAWGUI_CONTROLLER_MOUSE_EVENTS_H_
#define _STRAWGUI_CONTROLLER_MOUSE_EVENTS_H_

#include "sObserver.h"
#include "sEvents.h"
#include "sMath.h"

namespace sgui
{
namespace obs
{

	struct sMouseEvent : sEvent
	{
		typedef enum
		{
			EMB_LEFT = 0,
			EMB_MIDDLE,
			EMB_RIGHT,

			EMB_COUNT
		} EMouseButton;

		math::sPointf	m_position;
		
		const EEventType getType() const { return EVTYPE_MOUSE; }

		sMouseEvent(const math::sPointf& position) : m_position(position) {}
	};

	struct sMousePressEvent : sMouseEvent
	{
		EMouseButton	m_button;

        const EEventId getID() const { return EVID_MOUSE_PRESS; }
		sMousePressEvent(const math::sPointf& position, EMouseButton button) : sMouseEvent(position), m_button(button) {}
	};

	struct sMouseReleaseEvent : sMouseEvent
	{
		EMouseButton	m_button;

		const EEventId getID() const { return EVID_MOUSE_RELEASE; }
		sMouseReleaseEvent(const math::sPointf& position, EMouseButton button) : sMouseEvent(position), m_button(button) {}
	};

	struct sMouseMoveEvent : sMouseEvent
	{
		math::sPointf	m_previousPosition;

		const EEventId getID() const { return EVID_MOUSE_MOVE; }
		sMouseMoveEvent(const math::sPointf& position, const math::sPointf& previousPosition) : sMouseEvent(position), m_previousPosition(previousPosition) {}
	};
};
};

#endif